home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 019a / tpe30.zip / TPE.DOC < prev    next >
Text File  |  1991-10-27  |  97KB  |  1,991 lines

  1.  
  2.                           TPE: Turbo Powered Editor
  3.                                  Version 3.0
  4.                                  Brian Foley
  5.                              TurboPower Software
  6.                                 October 1991
  7.  
  8.  
  9. Introduction
  10. ------------------------------------------------------------------------------
  11.  
  12. TPE is a programmer's editor that we at TurboPower Software developed for our
  13. own use. TPE was created initially by fusing together parts of two editors in
  14. Borland's now defunct Editor Toolbox: FirstEd and MicroStar. Over time,
  15. however, TPE has evolved into a fairly distinctive program. The basic
  16. architecture remains largely the same, but the list of features has changed
  17. substantially. We'll get to those in a moment.
  18.  
  19. TPE was developed primarily for our own use, and for the most part it remained
  20. "our little secret" for roughly three years. We gave it to various friends and
  21. acquaintances during that time, however, and many of them became overnight
  22. converts. "Why don't you put it on CompuServe?" they would ask. "We don't want
  23. to face the non-stop stream of requests for enhancements. Everyone has his own
  24. idea of how a text editor should work," we would reply. Or "Why don't you sell
  25. it?" they would ask. "We don't want to get into that market. We like the
  26. business we're in." And we still feel that way.
  27.  
  28. So why did we decide to release TPE to the public after all? The main reason
  29. is that an awful lot of Turbo Pascal programmers we talk to seem to need it,
  30. or at least something like it. Many really like the Turbo Pascal IDE, the ease
  31. with which they can go from editing to compiling to debugging, but they are
  32. increasingly feeling cramped by the program's memory requirements. Many also
  33. like the alternative IDE in our Turbo Analyst package, but feel constrained by
  34. the limitations of its editor. These are problems that we just don't face
  35. ourselves, and the simple reason is that we use TPE for almost everything we
  36. write. We finally decided that it just wasn't right to keep it to ourselves
  37. any more. So here it is.
  38.  
  39. Since the list of features in TPE is indeed long, we'll just hit on some of
  40. the highlights here:
  41.  
  42.    - Virtual memory management (optional) allows editing of files larger than
  43.      will fit into memory
  44.    - Up to eight zoomable and resizable windows for editing multiple files
  45.      or different parts of a single file
  46.    - Swapping exec function--TPE uses only 4K of memory while executing DOS
  47.      commands or other programs
  48.    - Hotkey access to compilers (up to 5), assembler, and debugger
  49.    - Recognizes compiler errors generated by Turbo Pascal (TPC, TPCX, TPCW),
  50.      Turbo Assembler (TASM), Macro Assembler (MASM), and Borland C++ (BCC,
  51.      BCCX) and moves cursor to position of the error
  52.    - Maintains list of 8 most recently edited files and allows easy retrieval
  53.      of them
  54.    - Support for EGA 43-line, VGA 50-line, and user-defined text modes
  55.    - Synchronized scrolling option for comparing the contents of two windows
  56.    - Cut and paste between windows
  57.    - WordStar-compatible command structure
  58.    - Fully configurable keyboard
  59.    - Word wrap, smart tabs, fixed tabs, autoindent mode
  60.    - Keyboard macro system, search-and-apply-macro command, ability to create
  61.      self-repeating and self-aborting macros
  62.    - Text markers
  63.    - Undo command
  64.    - Four line-drawing modes
  65.    - Solid (block) cursor option
  66.    - Commands for indenting, aligning, and reformatting blocks of text
  67.    - Brace-matching commands for finding mismatched comment braces,
  68.      parentheses, brackets, etc.
  69.  
  70. In comparison with the best known commercial programmer's editors, TPE really
  71. lacks only two things: 1) It does not have a full undo facility, just a simple
  72. undelete function, and 2) its macro system is fairly simplistic.
  73.  
  74. On the other hand, TPE has the three F's: it's Fast, Flexible, and Free.
  75.  
  76.  
  77. What's New in TPE 3.0
  78. ------------------------------------------------------------------------------
  79.  
  80. Version 3.0 offers a multitude of enhancements over version 2.x. The following
  81. is a concise list of the things that are new and different in 3.0. Most of
  82. these items are described in greater detail elsewhere in the documentation.
  83.  
  84.   - now includes virtual memory manager to allow editing of files larger than
  85.     will fit into memory; select the source of virtual memory in TINSTALL or
  86.     with command line option
  87.   - now allows you to define up to 5 compilers; select the one you want to use
  88.     by pressing <ShF5> until its name appears on the status line
  89.   - can now swap to XMS as well as EMS and disk when executing other programs
  90.   - now uses separate file (TPE.CFG) for storing configuration data, allowing
  91.     TPE.EXE to be compressed; CFG file can optionally be updated on exit
  92.   - new <AltF5> command to display user screen
  93.   - now traps compiler errors generated by Turbo Pascal, TASM, MASM, and
  94.     Borland C++ and moves the cursor to the position of the first error or
  95.     warning
  96.   - now has option to pause after executing the primary file
  97.   - now has option to save all modified files before executing a DOS shell
  98.   - now has option to assemble the file in the current window (rather than the
  99.     primary file, so that you don't have to change the primary file in order
  100.     to assemble the file you're editing)
  101.   - now lets you specify (via TINSTALL) a user-defined video mode that you can
  102.     use by default or switch in and out of with <AltT><AltU>
  103.   - now offers a "synchronized scrolling" option, activated with <AltS><AltS>,
  104.     which causes all visible windows to scroll in unison when a cursor
  105.     movement command is issued
  106.   - now maintains a file "reload list" containing the last 8 files that you've
  107.     edited, the location of the cursor when the window was closed, and the
  108.     options that were set for the window; <CtrlF3> allows you to load a file
  109.     from the list into a new window, and <ShF3> lets you load a file from the
  110.     list into the current window; reload list also stores primary file setting
  111.   - the reload list is saved automatically in TPE.RLL, either in the current
  112.     directory or in the support path, when you exit (optional)
  113.   - if the reload list was saved, you can use 'TPE /L' to reload the last file
  114.     you edited, or 'TPE /A' to reload all files that were open when you last
  115.     exited from TPE; specifying either /L or /A will also restore your primary
  116.     file setting
  117.   - you can now specify up to 8 filenames on TPE's command line (old limit
  118.     was 3); you can also now specify a command line parameter that indicates a
  119.     line number to jump to following the filename
  120.   - other command line parameters let you select the video mode to use while
  121.     editing or request use of black-and-white video attributes; use "TPE /?"
  122.     to see a list of available command line options
  123.   - new option to change format of status line so that it displays total
  124.     number of lines in the file rather than the absolute position of the
  125.     cursor within the file
  126.   - now lets you set default search options with TINSTALL
  127.   - now lets you specify printer initialization/reset strings
  128.   - the <CtrlLeft> and <CtrlRight> commands in the prompt editor are now
  129.     consistent with those in TPE itself
  130.   - directory list now supplies '..' if necessary when displaying
  131.     subdirectories on Netware drives
  132.   - now has command line option to allow editing of UNIX files
  133.  
  134.  
  135. Installing TPE with TINSTALL
  136. ------------------------------------------------------------------------------
  137.  
  138. Before using TPE, you will want to run the installation program that comes
  139. with it, TINSTALL. There are MANY configuration options available in TINSTALL,
  140. but only a few are truly important, so we'll cover those first.
  141.  
  142. When you load TINSTALL, you'll be presented with a scrollable data entry
  143. screen that displays several basic configuration options. Most of the ones
  144. we're interested in now are on subsequent pages. To get to one you can't see
  145. at first, press either <Down> or <PgDn>.
  146.  
  147. The following are the configuration options you should set initially:
  148.  
  149.   Configuration option                     Default setting (if any)
  150.   ---------------------------------------- -----------------------------------
  151.   Directory for supporting files
  152.     This setting determines where TPE will look for its help file (TPE.HLP),
  153.     its standard macro file (TPE.MAC), and (by default) its reload list file
  154.     (TPE.RLL). Typically this will be the drive:\directory containing TPE.EXE
  155.     and TPE.CFG.
  156.  
  157.   Source of virtual memory for editing     RAM
  158.     This setting determines the source of memory to be used to store text
  159.     being edited. By default, TPE uses normal RAM, but you can also select
  160.     EMS, XMS, or Disk here. If the desired source of virtual memory is not
  161.     available, or is too limited to be of use, TPE will display an error
  162.     message when it starts and use normal RAM instead. We generally advise use
  163.     of Disk space for virtual memory only if you have a large (1-2 megabyte)
  164.     disk cache installed. See the section on TPE's Virtual Memory Manager,
  165.     below, for additional information about this feature.
  166.  
  167.   Printer to use                           LPT1
  168.     You can choose LPT1, LPT2, LPT3, COM1, or COM2. This setting is important
  169.     only in the sense that you can't print with TPE if it is wrong.
  170.  
  171.   Name of swap file                        $TPE$.SWP
  172.     This option is important only if your machine lacks EMS/XMS, or if you
  173.     don't have enough EMS/XMS for TPE to use it when swapping itself out
  174.     before executing other programs. (The amount of EMS/XMS needed varies
  175.     depending on the number of files loaded, etc., but at least 250K is needed
  176.     in all cases, more if EMS/XMS is being used by the virtual memory
  177.     manager.) The default filename is fine, but you will probably want to
  178.     specify a complete pathname, so that the swap file will always be in the
  179.     same place.
  180.  
  181.   Compiler 1
  182.   Name of compiler                         TPC   C:\TP6\TPC.EXE
  183.   Primary options                          /M /$D- /$L- /L
  184.   Secondary options                        /M /$D+ /$L+ /L /V
  185.     These let you specify the complete pathname for your primary compiler and
  186.     any command line options that should be sent to it, as well as an
  187.     abbreviation of up to 4 letters that uniquely identifies this compiler.
  188.     This abbreviation will be displayed on the status line when this compiler
  189.     is the default compiler. The two sets of options correspond to two
  190.     different Compile program commands in the editor, allowing you to easily
  191.     alternate between compiling with or without debug information. Note that
  192.     you can specify up to four other compilers for TPE to use (Compilers 2-5).
  193.     TINSTALL also lets you select a Default compiler (normally Compiler 1),
  194.     and TPE lets you switch compilers dynamically by pressing <ShF5>.
  195.  
  196.   Pathname for assembler                   C:\TASM\TASM.EXE
  197.   Options for assembler
  198.   Assemble file in current window          Y
  199.     These let you specify the complete pathname for your assembler and any
  200.     command line options that should be sent to it. If the Assemble file in
  201.     current window option is set to Y, TPE will pass the name of the file in
  202.     the current window to the assembler; if it is set to N, TPE will pass the
  203.     name of the primary file.
  204.  
  205.   Pathname for debugger                    C:\TD\TD.EXE
  206.   Options for debugger
  207.     These let you specify the complete pathname for your debugger and any
  208.     command line options that should be sent to it.
  209.  
  210. Of the remaining configuration options, only a couple require detailed
  211. explanations, so we'll go over those next.
  212.  
  213. On the third page of configuration options, you'll find a section labelled
  214. "Video attributes". The options in this section let you change the colors used
  215. by TPE. There are two sets of colors: one for color systems, the other for
  216. monochrome adapters and color adapters running in a black-and-white video mode
  217. (BW80). These are the color settings and what they mean:
  218.  
  219.   Attribute                                Color   Mono
  220.   ---------------------------------------- ------- ---------------------------
  221.   Text                                     1E      07
  222.     Ordinary text within an editing window.
  223.  
  224.   Marked blocks                            1B      0F
  225.     Color used to highlight marked blocks. Also used to display control
  226.     characters embedded in the text.
  227.  
  228.   Text markers                             5F      09
  229.     Color used to display text markers (sometimes called bookmarks).
  230.  
  231.   Highlighted search text                  4F      70
  232.     Color used to temporarily highlight text found in a search operation.
  233.  
  234.   Window status line                       2F      70
  235.     Color used for each window's status line.
  236.  
  237.   Command line                             0B      07
  238.     Color used for the command line at the top of the screen.
  239.  
  240.   Block cursor                             4F      70
  241.     Color used for a solid (non-blinking) block cursor.
  242.  
  243.   Menu items (unselected)                  3F      07
  244.     Color used for unselected items in a menu (filenames in a directory list,
  245.     for example).
  246.  
  247.   Menu items (selected)                    3F      0F
  248.     Color used to highlight a selected item in a menu.
  249.  
  250.   Menu items (alternate)                   4F      70
  251.     Alternate color used for unselected items in a menu (directory names in a
  252.     directory list, for example).
  253.  
  254.   Menu frame                               3E      0F
  255.     Color used for the frame around a menu/pick list.
  256.  
  257. When the cursor is on one of these fields, the line at the top of the screen
  258. will change colors to give you a sample of the current color setting for that
  259. particular item.
  260.  
  261. There are two ways to change one of these colors. If you know the hex value
  262. for the color you want, you can just enter it. For example, for white text on
  263. a red background, you'd enter "4F". The easier way is to press <F10> and
  264. select the color you want with the cursor keys. When you've got the correct
  265. color highlighted, press <Enter>.
  266.  
  267. The next option that requires special comment is the very first one on the
  268. second page of options, Modify key assignments. When you press <Enter> with
  269. the cursor on this field, a new window will appear that shows all the commands
  270. in TPE and the keys they are assigned to.
  271.  
  272. To change or add a key assignment, move the highlight bar to the one you want
  273. to modify and press <Enter>, then press the key(s) you want to assign the
  274. command to. While entering a key assignment, the following commands are
  275. available:
  276.  
  277.   <BkSp>, <CtrlBkSp>
  278.   Delete last key
  279.  
  280.   <CtrlC>, <CtrlY>
  281.   Clear the key assignment
  282.  
  283.   <CtrlR>, <CtrlQ><L>
  284.   Restore the previous value
  285.  
  286.   <Enter>
  287.   Accept key assignment
  288.  
  289.   <Esc>, <CtrlBreak>
  290.   Cancel the operation
  291.  
  292. If you need to enter one of these keys as part of the key assignment, press
  293. <ScrollLock> to switch to literal mode rather than command mode, enter the
  294. key(s), then press <ScrollLock> to switch back to command mode.
  295.  
  296. To accept any changes that you have made and return to the main entry screen,
  297. press <Esc> or <CtrlEnter>. TINSTALL will then check to make sure that there
  298. are no conflicts among the key assignments. If any conflicts are found, an
  299. error message will be displayed and the keys causing the conflicts will be
  300. highlighted. TINSTALL will not allow you to return to the main entry screen
  301. until you have resolved all conflicts. If you decide that you'd rather just
  302. leave the keys the way they were before you made your changes, you can press
  303. <CtrlR> to Restore the default settings, then press <Esc>.
  304.  
  305. The only other options that require special comment are the following:
  306.  
  307.   Configuration option                     Default setting
  308.   ---------------------------------------- -----------------------------------
  309.   Printer initialization string
  310.   Printer reset string                     ^L^M
  311.  
  312. These options allow you to specify special strings that are to be sent to the
  313. printer before and after text is sent to the printer. They require special
  314. comment only because any strings you may specify will typically need to
  315. contain control characters, such as <Esc>. To enter a control character into
  316. one of these strings, simply press <CtrlP> first. For example, to enter an
  317. <Esc> character, press <CtrlP><Ctrl[>. The default printer reset string simply
  318. sends a form feed and carriage return to the printer to eject the last page.
  319. If this isn't necessary for your printer, you should clear this string.
  320.  
  321. The rest of the options are fairly self-explanatory, so we'll give only a
  322. brief description of what they mean. Most of them correspond to TPE commands
  323. that we'll be discussing later.
  324.  
  325.  
  326.   Configuration option                     Default setting (if any)
  327.   ---------------------------------------- -----------------------------------
  328.  
  329. Configuration options
  330.  
  331.   File for virtual memory on disk          $TPE$.VMF
  332.     Specifies the name of the file that the virtual memory manager will use if
  333.     Disk is the source of virtual memory. If no directory is specified, the
  334.     file will be stored in the current directory.
  335.  
  336.   Amount of EMS/XMS to reserve (in KB)     0
  337.     This value specifies the amount of EMS or XMS (in kilobytes) that the
  338.     virtual memory manager is supposed to leave available for other programs.
  339.     Note that it always sets aside enough memory for the swapping exec
  340.     function to use EMS/XMS if you answer Yes to either the "Use EMS if
  341.     available" question or the "Use XMS if available" question" (see below).
  342.  
  343.   Save config data on exit                 N
  344.     If this option is on, the CFG file is updated automatically on exit.
  345.  
  346.   Save reload list on exit                 Y
  347.     If this option is on, the reload list is saved automatically on exit.
  348.  
  349.   Directory for reload list                Support path
  350.     This option lets you specify where you want the reload list stored when
  351.     you exit from TPE. By default, it's stored in the support path, but you
  352.     can also select Currrent dir, in which case you can maintain multiple
  353.     reload lists in multiple directories.
  354.  
  355. File options
  356.  
  357.   Create BAK files when saving             Y
  358.     If Yes, TPE will rename existing files with a BAK extension before
  359.     overwriting them.
  360.  
  361.   Expand tabs to spaces when reading       Y
  362.     If Yes, tab characters are expanded to spaces when reading in a new file.
  363.  
  364.   Compress spaces to tabs when writing     N
  365.     If Yes, spaces are compressed to tab characters when writing a file to
  366.     disk.
  367.  
  368.   Default extension for filenames          PAS
  369.     Extension to be applied to filenames when none is specified. If you don't
  370.     want one to be applied, leave this field empty.
  371.  
  372. Editing options
  373.  
  374.   Insert mode on by default                Y
  375.     If Yes, insert mode will be the default, else overtype mode.
  376.  
  377.   AutoIndent on by default                 Y
  378.     If Yes, autoindent mode is on by default.
  379.  
  380.   Word wrap on by default                  Y
  381.     If Yes, word wrap is on by default.
  382.  
  383.   Fixed tabs on by default                 N
  384.     If Yes, fixed tabs will be the default, else smart tabs.
  385.  
  386.   Compress lines before wrapping           Y
  387.     If Yes, excess white space will be compressed out of a line when wrapping.
  388.  
  389.   Default left margin                      1
  390.     Specifies the default left margin.
  391.  
  392.   Default right margin                     78
  393.     Specifies the default right margin.
  394.  
  395.   Default size for fixed tabs              8
  396.     Specifies the default spacing for fixed tabs.
  397.  
  398.   Indent level for marked blocks           2
  399.     This setting governs the behavior of the indent and unindent block
  400.     commands.
  401.  
  402.   Lines to reserve on undelete stack       20
  403.     Specifies the size of the stack used to store deleted lines.
  404.  
  405.   Default search options                   U
  406.     Default options to use for search and find-and-replace commands.
  407.  
  408. Window options
  409.  
  410.   Use block cursor when editing            Y
  411.     If Yes, a solid block cursor is used rather than a blinking cursor.
  412.  
  413.   Zoom windows by default                  N
  414.     If Yes, new windows will be zoomed when first opened.
  415.  
  416.   Use black and white video attributes     N
  417.     If Yes, TPE will use black and white (monochrome) video attributes, even
  418.     if a color adapter is detected.
  419.  
  420.   Status line format (bytes or lines)      Byte count
  421.     If this option is set to Byte count, the status line for each window will
  422.     display the absolute position of the cursor within the file. If it is set
  423.     to Total lines, the status line will instead display the total number of
  424.     lines in the file--e.g., "5 / 1024", where 5 is the current line number
  425.     and 1024 is the total number of lines in the file.
  426.  
  427. Screen options
  428.  
  429.   User-defined video mode specified        N
  430.     If Yes, you must specify a user-defined video mode in the next field. This
  431.     mode can be toggled on/off within TPE using <AltT><AltU>.
  432.  
  433.   User-defined video mode                  00
  434.     If the answer to the previous question is Yes, this field should specify,
  435.     using hexadecimal notation, the number of the video mode you want TPE to
  436.     use when the <AltT><AltU> command is issued. TPE is designed to work with
  437.     text modes that display anywhere from 40 to 132 columns, and virtually
  438.     any number of rows. Specifying 01 here, for example, will allow you to
  439.     activate 40x25 mode on any non-monochrome adapter. Specifying 55 here will
  440.     allow you to activate 132x25 mode on a VGA that uses the Paradise chip
  441.     set. Be forewarned that not all video cards that implement non-standard
  442.     text modes allow them to be activated using the standard BIOS Set video
  443.     mode function. If yours doesn't, you won't be able to use this facility in
  444.     TPE.
  445.  
  446.   Default to 43-/50-line mode (EGA/VGA)    N
  447.     If Yes, TPE will switch to 43-/50-line mode when the program first starts.
  448.  
  449.   Default to user-defined video mode       N
  450.     If Yes, TPE will switch to the user-defined video mode when the program
  451.     first starts.
  452.  
  453.   Suppress snow (CGA)                      Y
  454.     If Yes, TPE will try to suppress snow when writing to video memory on a
  455.     CGA card.
  456.  
  457. Exec options
  458.  
  459.   Default extension for executables        EXE
  460.     Normally this will be "EXE"; change it to "COM" only if you write mostly
  461.     programs that compile to COM files.
  462.  
  463.   Use EMS if available                     Y
  464.     If Yes, EMS is used for swapping if it is available.
  465.  
  466.   Use XMS if available                     Y
  467.     If Yes, XMS is used for swapping if it is available.
  468.  
  469.   Display "Swapping..." message            Disk
  470.     Determines whether or not a "Swapping" message is displayed when executing
  471.     other programs. If "Disk", it is displayed only when swapping to disk. If
  472.     "Always", it is displayed when swapping to disk, EMS, or XMS. If "Never",
  473.     it is never displayed.
  474.  
  475.   Save modified files before exec          N
  476.     If Yes, TPE will save all modified files before executing a DOS shell or
  477.     executing a program you specify. Note that this is always done when TPE
  478.     execs the compiler, assembler, debugger, or the program associated with
  479.     the primary file.
  480.  
  481.   Pause after running primary program      N
  482.     If Yes, you will be asked to press a key to return to TPE after it has
  483.     executed the program associated with the primary file. Note that you can
  484.     view the output of your program by pressing <AltF5> to display "the user
  485.     screen."
  486.  
  487.   Confirm parameters                       Y
  488.     If Yes, you will be given a chance to edit the command line sent to any
  489.     program being executed.
  490.  
  491. Compilers
  492.  
  493.   Default compiler                         1 (TPC)
  494.     Press <Space>, <+>, or <-> here to select the compiler you'll normally
  495.     want to use. Within TPE, you can change this setting with <ShF5>.
  496.  
  497.   Trap compilation errors                  Y
  498.     If Yes, TPE will attempt to identify errors reported by the compiler or
  499.     assembler, and to move the cursor to the position of the error. TPE
  500.     currently recognizes errors and warnings reported by recent versions of
  501.     Turbo Pascal (TPC and TPCX), Turbo Pascal for Windows (TPCW), Turbo
  502.     Assembler (TASM), Macro Assembler (MASM), and Borland C++ (BCC, BCCX).
  503.     You'll probably want to set this to N only if your default compiler is not
  504.     one of these. Note that in the case of compilers/assemblers that can
  505.     generate multiple errors and warnings, TPE will pay attention only to the
  506.     first error or warning still visible on the user screen. Press <AltF5> to
  507.     view any other error messages that were generated.
  508.  
  509.   Open new window for compile errors       Y
  510.     If Yes, TPE will open a new window when it detects a compiler error in a
  511.     file that is not currently loaded. If No, TPE will load the file into the
  512.     current window if it is not already loaded.
  513.  
  514. Assembler
  515.  
  516.   Name of assembler                        C:\TASM\TASM.EXE
  517.     Specify the complete pathname of your assembler (if any).
  518.  
  519.   Options for assembler
  520.     Specify the default options you want passed to the assembler. If you're
  521.     using MASM, you should specify ";" here if nothing else.
  522.  
  523.   Assemble file in current window          Y
  524.     If Yes, TPE will pass the assembler the name of the file in the current
  525.     window. If No, it will pass the name of the primary file.
  526.  
  527. Debugger
  528.  
  529.   Name of debugger                         C:\TD\TD.EXE
  530.     Specify the complete pathname of your debugger (if any).
  531.  
  532.   Options for debugger
  533.     Specify the default options you want passed to the debugger.
  534.  
  535. As you look at the default settings, you'll see that the program is configured
  536. for use with Turbo Pascal 6.0, Turbo Assembler, and Turbo Debugger. That
  537. doesn't mean it can't be used with other languages and tools, however. One of
  538. the most enthusiastic users of TPE is a C programmer, and another programs
  539. mostly in assembly language.
  540.  
  541. Now, when you have set the options the way you want them, press <CtrlEnter>.
  542. TINSTALL will then save any changes you have made by modifying (or creating)
  543. TPE.CFG, and it will write a new version of TPE.HLP that reflects the key
  544. assignments you have specified. Note that, if it doesn't yet exist, TPE.HLP
  545. will be created whether you have modified any configuration settings or not.
  546. If you haven't changed anything and you don't want TPE.HLP to be created, or
  547. if you want to cancel the changes you have made, press <Esc> to exit instead
  548. of <CtrlEnter>.
  549.  
  550.  
  551. Starting TPE
  552. ------------------------------------------------------------------------------
  553.  
  554. Now that you've got TPE installed for your system, you're ready to run the
  555. program. TPE expects a command line of the following form:
  556.  
  557.    TPE [Options] [FileName1] .. [FileName8]
  558.  
  559. That is, you may specify up to eight filenames on the command line. If you
  560. have given TPE a default extension to use ("PAS" is the default), it will
  561. apply it to these filenames if no extension is specified. For example, to edit
  562. MYPROG.PAS, you could enter either of the following
  563.  
  564.   tpe myprog
  565.   tpe myprog.pas
  566.  
  567. If you need to edit a file without an extension, add a period to the end of
  568. the name:
  569.  
  570.   tpe readme.
  571.  
  572. Although a filename may contain wildcards, TPE will ignore all filenames
  573. thereafter. That is, the following will work:
  574.  
  575.    tpe myprog myprog.inc *.doc
  576.  
  577. TPE would load MYPROG.PAS and MYPROG.INC into the editor, and it would then
  578. display a list of all files in the current directory with an extension of DOC.
  579.  
  580. This will not work, however:
  581.  
  582.    tpe *.pas myprog.inc *.doc
  583.  
  584. TPE would ignore everything after "*.pas".
  585.  
  586. If you don't specify any filenames as parameters, TPE will start by displaying
  587. a directory list. If there's a default extension, it will use that extension
  588. (e.g., "*.PAS"); if not, it will display all files in the directory (if memory
  589. allows). If you press <Esc> twice, TPE will create a "NONAME" file for you to
  590. edit, which you can rename later when you go to save the file.
  591.  
  592. TPE also recognizes the following command line options:
  593.  
  594.   /L     Reload last file (can be used multiple times)
  595.   /A     Reload all files
  596.   /Jnnn  Jump to line nnn. MUST follow a filename.
  597.   /E     Use EMS for virtual memory
  598.   /X     Use XMS for virtual memory
  599.   /D     Use disk for virtual memory
  600.   /N     Use normal RAM
  601.   /U     Use user-defined video mode
  602.   /43    Use EGA 43-line mode
  603.   /50    Use VGA 50-line mode (same as /43)
  604.   /BW    Use black and white (mono) video attributes
  605.   /UNIX  Edit UNIX files
  606.   /?     Display this help screen
  607.  
  608. These options are fairly self-explanatory. /E, /X, /D, and /N allow you to
  609. specify the source of the memory to be used by the virtual memory manager,
  610. overriding the default setting selected with TINSTALL. /U, /43, and /50 let
  611. you specify the text mode to be used while editing. And /BW lets you request
  612. the use of black-and-white video attributes. You might use this when running
  613. TPE on a laptop.
  614.  
  615. The /J option lets you specify a line number to jump to:
  616.  
  617.    tpe myprog.pas /J750
  618.  
  619. would load MYPROG.PAS and move the cursor to line 750. This parameter should be
  620. used only if the previous parameter was an actual filename. If it wasn't a
  621. filename, the parameter will be ignored.
  622.  
  623. The /UNIX option should be specified when editing files intended to be used
  624. under UNIX. If this option is specified, TPE uses ^J (rather than ^M^J) as a
  625. line delimiter, and it does not append a ^Z to the ends of files it creates.
  626.  
  627. /L and /A require some explanation. By default, when you exit from TPE, it
  628. writes the contents of its reload list to a file, TPE.RLL, either in the
  629. current directory or in the support directory. Just before doing so, it adds
  630. all files currently in memory to the reload list and marks them as loaded.
  631. The file above the current file is added first, and the current file is added
  632. last, at the top of the list. Now, if you start TPE with the /L option, it
  633. will automatically load the file that was current when you last exited and put
  634. the cursor right where it was. To load both that file and the one that was
  635. below it, use "TPE /L /L". To reload all files that were loaded at the time
  636. you exited, use "TPE /A". The windows won't necessarily be the same size or in
  637. the same place as they were, but the same files will be loaded (unless
  638. multiple windows were open onto the same file) and the cursor will be in the
  639. right place in each window. Note that specifying either /L or /A will also
  640. restore your primary file setting to what it was when you exited.
  641.  
  642.  
  643. TPE's Configuration File (TPE.CFG)
  644. ------------------------------------------------------------------------------
  645.  
  646. A few words about the TPE.CFG file are also in order here. TPE will normally
  647. look for it first in the current directory, then in the directory that TPE.EXE
  648. was loaded from (under DOS 3.x or higher), then in all directories on DOS's
  649. PATH. If it can't find it, it will display an error message and proceed to use
  650. the "factory default" settings.
  651.  
  652. Note, however, that if you need to run TPE.EXE from a network drive and have
  653. multiple users using it, each with his own TPE.CFG file, what you can do is
  654. have each user set an environment variable that specifies the directory where
  655. his copy of TPE is stored:
  656.  
  657.   SET TPE=C:\TPE
  658.  
  659. DO NOT specify the name of the configuration file, which is assumed to be
  660. TPE.CFG, just the drive and directory. This environment variable, if it
  661. exists, will be used only to locate TPE.CFG. (TINSTALL does not check for the
  662. existence of this environment variable, incidentally, only TPE.)
  663.  
  664. Note too that, although it is possible to have multiple TPE.CFG files stored
  665. in multiple directories, we generally recommend that you maintain a single CFG
  666. file, preferably in the same directory as TPE.EXE. If you have multiple CFG
  667. files with different settings stored in various directories, the behavior of
  668. TPE will change depending on where you are when you load it. This could
  669. conceivably be desirable in certain cases, but it can also lead to confusion
  670. in others. For this last reason, we discourage the practice.
  671.  
  672. On the other hand, if you've selected the Save config data on exit
  673. option, and you're the kind of programmer who works on a variety of projects
  674. at once, each with its own directory, and you always change to the appropriate
  675. directory before working on that project, you may also prefer to maintain
  676. multiple CFG files, one in each of these directories. If so, you will probably
  677. also want to select the option to save the reload list in the current
  678. directory rather than the support path.
  679.  
  680.  
  681. The Status Line
  682. ------------------------------------------------------------------------------
  683.  
  684. As indicated earlier, the top line of TPE's screen is used as a command line.
  685. It's where you respond to requests for search strings, filenames, etc., and it
  686. is also used to display messages. The remainder of the screen is used for the
  687. editing windows, up to 8 of them at a time. At the top of each window is a
  688. status line of the following form:
  689.  
  690. »SAVE« FILENAME.EXT Line nnnnnn Col nnn Byte nnnnnnnn TPC  INS ST AI WW * »ZOOM«
  691.  
  692. The "»SAVE«" indicator is present only when the file has been modified. If you
  693. are in a line-drawing mode, it will be replaced by a series of characters that
  694. indicate which of the four modes you are in (e.g., "─│┌┐└┘"). Or, if
  695. <ScrollLock> is on, "ScLock" will appear here instead, to indicate that the
  696. line drawing mode is being temporarily overridden.
  697.  
  698. "FILENAME.EXT" is the name of the file being edited. If you need to be
  699. reminded of its full pathname, use the <AltI> command. (If you are editing in
  700. a user-defined 132-column mode, the full pathname will be displayed here if
  701. possible.)
  702.  
  703. The next three slots on the command line indicate the position of the cursor
  704. relative to the beginning of the file. Note that if you have selected the
  705. Total lines option within TINSTALL, the format of the status line will be
  706. slightly different:
  707.  
  708. »SAVE« FILENAME.EXT Line nnnnnnn / nnnnnnn  Col nnn   TPC  INS ST AI WW * »ZOOM«
  709.  
  710. In this format, the "nnnnnnn / nnnnnnn" following Line means "Current line /
  711. Total lines".
  712.  
  713. "TPC" means that the default compiler is TPC.EXE. Use <ShF5> to select a
  714. different compiler.
  715.  
  716. "INS" means that you are in insert mode. "OVR" means that you are in overtype
  717. mode.
  718.  
  719. "ST" means that smart tabs are in use. "FT" means that fixed tabs are in use.
  720.  
  721. "AI" means that autoindent mode is in effect.
  722.  
  723. "WW" means that word wrap is on.
  724.  
  725. "*" indicates that snow-checking is on. It will never appear unless you have a
  726. CGA card.
  727.  
  728. "»ZOOM«" means that the current window has been zoomed. Three other messages
  729. can appear in this position: If the synchronized scrolling option is on,
  730. "∙SYNC∙" will appear here. If macro recording is on, "RECORD" will appear here
  731. instead. Or, if a macro is currently being played back, "MACRO!" will appear
  732. here until the macro is finished. (This visual reminder is useful because
  733. screen updates are suppressed while a macro is in progress.)
  734.  
  735. The next few sections provide descriptions of all the commands in TPE,
  736. arranged into categories. The one that you will probably find most useful at
  737. first is the help command, <F1>, which opens a new window, loads TPE.HLP into
  738. it, and then zooms the window. This file, created by TINSTALL, gives a
  739. complete list of all the commands (arranged pretty much as they are here) and
  740. the keys they are assigned to.
  741.  
  742. Basic Cursor Movement Commands
  743. ------------------------------------------------------------------------------
  744.  
  745. Character left                                   <Left>, <CtrlS>
  746. Cursor left one character.
  747.  
  748. Character right                                  <Right>, <CtrlD>
  749. Cursor right one character.
  750.  
  751. Word left                                        <CtrlLeft>, <CtrlA>
  752. Cursor left one word. A "word" is any sequence of characters delimited by
  753. one of the following characters: space, tab, carriage return, line feed,
  754. < > , . / ? ; : " [ ] { } - = \ + | ( ) % @ & ^ $ # ! ~. If the cursor is
  755. at the beginning of a line, it is moved to the end of the previous line.
  756.  
  757. Word right                                       <CtrlRight>, <CtrlF>
  758. Cursor right one word. If the cursor is at the end of a line, it is moved to
  759. the beginning of the following line.
  760.  
  761. Cursor to left side                              <Home>, <CtrlQ><S>
  762. Cursor to beginning of line.
  763.  
  764. Cursor to right side                             <End>, <CtrlQ><D>
  765. Cursor to end of line--i.e., the position following the last non-blank
  766. character on the line. Trailing blanks are always removed from all lines to
  767. preserve space.
  768.  
  769. Line up                                          <Up>, <CtrlE>
  770. Cursor up one line.
  771.  
  772. Line down                                        <Down>, <CtrlX>
  773. Cursor down one line.
  774.  
  775. Scroll up                                        <CtrlW>
  776. Scroll window up one line. The cursor will remain on the current line unless
  777. that line is at the bottom of the window.
  778.  
  779. Scroll down                                      <CtrlZ>
  780. Scroll window down one line. The cursor will remain on the current line unless
  781. that line is at the top of the window.
  782.  
  783. Page up                                          <PgUp>, <CtrlR>
  784. Scroll window up one page.
  785.  
  786. Page down                                        <PgDn>, <CtrlC>
  787. Scroll window down one page.
  788.  
  789.  
  790. More Cursor Movement Commands
  791. ------------------------------------------------------------------------------
  792.  
  793. Top of file                                      <CtrlPgUp>, <CtrlQ><R>
  794. Cursor to beginning of file.
  795.  
  796. End of file                                      <CtrlPgDn>, <CtrlQ><C>
  797. Cursor to end of file.
  798.  
  799. Top of window                                    <CtrlHome>, <CtrlQ><E>
  800. Cursor to top line of current window. The cursor remains in the same column.
  801.  
  802. Bottom of window                                 <CtrlEnd>, <CtrlQ><X>
  803. Cursor to bottom line of current window. The cursor remains in the same
  804. column.
  805.  
  806. Up to equal indent                               <CtrlJ><B>
  807. Moves the cursor to the beginning of the first previous line with the same
  808. indentation level as the current line. For example, if the first non-blank
  809. character in the current line is at column 20, the cursor is moved to the
  810. next line up that also begins at column 20.
  811.  
  812. Down to equal indent                             <CtrlJ><E>
  813. Moves the cursor to the beginning of the next line with the same indentation
  814. level as the current line.
  815.  
  816. Go to line                                       <CtrlJ><L>
  817. Prompts for a line number, then moves the cursor to the specified line. Any
  818. positive integer value in the range 1 to 32767 is valid. If the value is
  819. preceded by a plus (+) or minus (-) sign, the target line number will be
  820. calculated relative to the current line. If the target line number is greater
  821. than the number of lines in the file, the cursor will be moved to the last
  822. line in the file.
  823.  
  824. Go to column                                     <CtrlJ><C>
  825. Prompts for a column number, then moves the cursor to the specified column of
  826. the current line. Any positive integer value in the range 1 to 999 is valid.
  827. If the value is preceded by a plus (+) or minus (-) sign, the target column
  828. number will be calculated relative to the current column. If the target column
  829. is greater than 999 or less than 1, the command is ignored.
  830.  
  831. Go to byte                                       <CtrlJ><A>
  832. Prompts for an byte offset, then moves the cursor to the specified absolute
  833. offset within the file. If the value is preceded by a plus (+) or minus (-)
  834. sign, the target offset will be calculated relative to the current offset. If
  835. the target offset is greater than the number of bytes in the file, the cursor
  836. will be moved to the end of the file.
  837.  
  838. Previous cursor position                         <CtrlQ><P>
  839. Jump to the position the cursor was at before it was moved to the current
  840. line. This command is especially useful following a global search or replace
  841. operation.
  842.  
  843. Match braces forward                             <CtrlQ><[>
  844. This command may be used to locate a matching "brace" character or character
  845. pair. For example, if the cursor is on a '{' character, this command would
  846. move the cursor to the corresponding '}'. The following characters and
  847. character pairs may be matched:
  848.  
  849.       '    '          single quotes
  850.       "    "          double quotes
  851.       (    )          parentheses
  852.       [    ]          square brackets
  853.       <    >          angle brackets
  854.       {    }          Pascal-style comment braces
  855.       (*   *)         Pascal-style comments
  856.       /*   */         C-style comments
  857.  
  858. Note that this command accounts for nested braces. For example, if the cursor
  859. were on the first '(' in
  860.  
  861.    I := (X*(Y+Z));
  862.  
  863. the cursor would move to the ')' preceding the ';', not the one following the
  864. 'Z'. Although the name of the command implies that it always searches in a
  865. forward direction, in most cases the search direction is determined by the
  866. character that the cursor is on. For example, if it is on a '}', it will
  867. search backwards. The only exceptions are the single- and double-quote
  868. characters, cases in which the search direction cannot be inferred. This
  869. command will always search forward for a match in these cases.
  870.  
  871. Match braces backward                            <CtrlQ><]>
  872. This command is identical to the Match braces forward command, except in those
  873. cases where the cursor is on single- or double-quote character. In these
  874. cases, the command will always search backward.
  875.  
  876.  
  877. Insertion and Deletion Commands
  878. ------------------------------------------------------------------------------
  879.  
  880. New line                                         <Enter>
  881. In insert mode, this command inserts a line break at the position of the
  882. cursor; if autoindent mode is in effect, the cursor moves to the next line and
  883. to the same column as the first non-blank character in the previous line;
  884. otherwise, to column 1 of the new line. In overtype mode, this command moves
  885. the cursor to column 1 of the next line without inserting a new line, whether
  886. autoindent mode is in effect or not.
  887.  
  888. Insert line                                      <CtrlN>
  889. Inserts a line break at the position of the cursor without moving the cursor.
  890.  
  891. Insert control char                              <CtrlP>
  892. Allows control characters to be entered into the text. For example, pressing
  893. <CtrlP><CtrlG> would insert a ^G into the text (pressing <CtrlP><G> would
  894. insert a G). Control characters are always displayed as highlighted capital
  895. letters in the color used for marked blocks.
  896.  
  897. Delete current character                         <Del>, <CtrlG>
  898. Deletes the character under the cursor and moves any characters to the right
  899. of it one position to the left. This command does not work across line
  900. breaks.
  901.  
  902. Delete left character                            <Bksp>, <CtrlBksp>
  903. Moves the cursor one character to the left and deletes the character there.
  904. Any characters to the right of the cursor are moved one position to the left.
  905. If the cursor is at the beginning of a line, the current line will be joined
  906. with the previous line.
  907.  
  908. Delete right word                                <CtrlT>
  909. Deletes the word to the right of the cursor (see the definition of "word"
  910. given above for the Word left command). This command works across line breaks
  911. and thus may be used to remove line breaks.
  912.  
  913. Delete line right                                <CtrlQ><Y>, <F6>
  914. Delete all text from the cursor to the end of the line.
  915.  
  916. Delete line                                      <CtrlY>, <CtrlF6>
  917. Delete the current line.
  918.  
  919. Delete line (no undo)                            *none*
  920. This command is the same as the Delete line command, but the deleted line is
  921. not saved in the undo buffer. It is potentially useful when using the undo
  922. buffer to temporarily store lines being moved.
  923.  
  924.  
  925. Tab Commands
  926. ------------------------------------------------------------------------------
  927.  
  928. Tab                                              <Tab>, <CtrlI>
  929. Moves the cursor to the next tab stop. If insert mode is on, any text to the
  930. right of the cursor is moved to the right of the tab stop. When fixed tabs are
  931. in effect, the tab stops occur at 8-column intervals (by default). When smart
  932. tabs are in effect (the default setting), the tab stops are determined by the
  933. locations of the words on the previous line; the first character in each word
  934. represents a tab stop.
  935.  
  936. Backward tab                                     <ShTab>
  937. Moves the cursor to the previous tab stop. This command does nothing if smart
  938. tabs are in effect.
  939.  
  940. Toggle fixed tabs                                <CtrlO><F>
  941. Toggles the tab mode between smart tabs and fixed tabs.
  942.  
  943. Set tab size                                     <AltS><AltT>
  944. Prompts the user for the number of columns between tab stops. The value
  945. specified must be in the range 1..100.
  946.  
  947. Toggle tab expansion                             <AltT><AltT>
  948. Activates or deactivates option to "expand" tab characters to spaces when
  949. reading in files created with other editors. The assumed size of the tabs is
  950. specified with the Set tab size command.
  951.  
  952. Toggle tab writing                               <AltT><AltW>
  953. Activates or deactivates option to compress spaces to tab characters when
  954. writing files to disk. The assumed size of the tabs is specified with the Set
  955. tab size command. Note that TPE will not try to compress spaces within
  956. quotation marks.
  957.  
  958.  
  959. Undo Commands
  960. ------------------------------------------------------------------------------
  961.  
  962. Restore line                                     <CtrlQ><L>, <ShF6>
  963. Restore the original contents of the current line.
  964.  
  965. Undo last deletion                               <CtrlQ><U>, <AltU>
  966. Used to restore whole lines deleted with the Delete line or Delete block
  967. commands. It will not restore single characters or words. To "undo" your most
  968. recent changes to the current line, use the Restore Line command. The size of
  969. the "undo buffer" used to save deleted lines may be specified with the Set
  970. undo limit command or with TINSTALL.
  971.  
  972. Insert undo buffer                               <CtrlQ><V>
  973. Inserts the entire contents of the undo buffer into the current window just
  974. prior to the current line. This command is intended primarily to be used in
  975. macros.
  976.  
  977. Flush undo buffer                                <CtrlQ><J>
  978. Empties the undo buffer. This command is intended primarily for use in
  979. macros, in cases where you wish to use the undo buffer as a scratchpad.
  980.  
  981. Set undo limit                                   <AltS><AltU>
  982. Allows you to set the size of the "undo buffer" used to store deleted lines.
  983. The default value is 20 lines. The size of this buffer may also be set with
  984. TINSTALL.
  985.  
  986.  
  987. Search and Replace
  988. ------------------------------------------------------------------------------
  989.  
  990. Find pattern                                     <CtrlQ><F>, <F4>
  991. This command lets you search for any string of up to 67 characters. When you
  992. enter this command, you will be prompted for a search string. The last search
  993. string entered (if any) will be displayed as a default. You may select it
  994. again by pressing <Enter>, edit it, or enter a new search string. <Esc> or
  995. <CtrlU> will cancel a search command, and <CtrlP> may be used to enter control
  996. characters: for example, to find a period at the end of a line, you would
  997. enter <.><CtrlP><CtrlM>.
  998.  
  999. After the search string is entered, you are asked for search options. The
  1000. options you used last are displayed at first. You may enter new options, edit
  1001. the current options, or select them by pressing <Enter>. The following options
  1002. are available:
  1003.  
  1004.   B Search backward from the current position of the cursor toward the
  1005.     beginning of the file.
  1006.  
  1007.   G Search globally. The entire file is scanned for the search string,
  1008.     regardless of the current position of the cursor. The search starts at the
  1009.     beginning of the file if searching forward; at the end if searching
  1010.     backward.
  1011.  
  1012.   L Search only within the currently marked block.
  1013.  
  1014.   n Find the n'th occurrence of the search string. The search starts at the
  1015.     position of the cursor unless the L or G option is also specified.
  1016.  
  1017.   U Ignore case; treat all alphabetic characters as if they were in upper
  1018.     case.
  1019.  
  1020.   W Search for whole words only; skip matching patterns that are embedded in
  1021.     other words.
  1022.  
  1023. If the text contains a target matching the search string, the target is
  1024. highlighted and the cursor is positioned just beyond it.
  1025.  
  1026. Find and replace                                 <CtrlQ><A>, <F3>
  1027. This command allows you to replace one string of up to 67 characters with
  1028. another. You will be prompted first for a search string, next for a
  1029. replacement string, and finally for the search options. The valid options are
  1030. the same as those for the Find pattern command, with the following exceptions:
  1031.  
  1032.   N Replace without asking.
  1033.  
  1034.   n Make a maximum of n replacements. (Overridden by L option.)
  1035.  
  1036. If the text contains a target matching the search string, the target is
  1037. highlighted and the cursor is positioned just beyond it. You are then asked if
  1038. you wish to replace it. Press <Y> to replace it, <N> to ignore it, <A> to
  1039. replace it and all subsequent matches without asking, or <Q> to abort the
  1040. operation. If the N option was selected, this question will not be asked.
  1041.  
  1042. Search and apply macro                           <CtrlQ><M>
  1043. The Search and apply macro command lets you search for any string of up to 67
  1044. characters and then "apply a macro" to it: that is, move the cursor to the
  1045. location of the target, and execute the commands stored in the macro. Search
  1046. strings are entered in the same way that they are for the Find pattern
  1047. command. After the search string is entered, you are shown a menu containing
  1048. all of the macros you've defined. Move the highlight with the up and down
  1049. cursor keys, and select the macro to apply by pressing <Enter>. You can abort
  1050. the operation by pressing <Esc>.
  1051.  
  1052. Finally, you are prompted for options. The options you used last are
  1053. displayed at first. You may enter new options (canceling the old ones), edit
  1054. the current options, or select them by pressing <Enter>. All the options
  1055. available for the Find and Replace command are available here as well. The
  1056. screen will not be updated while a search and apply macro operation is being
  1057. performed. If you need to stop it, use the Abort command (<CtrlU>).
  1058.  
  1059. The Search and apply macro command can be invoked inside a macro, making it
  1060. possible to create an almost unlimited array of special commands. Note,
  1061. however, that it may not be invoked recursively. That is, the macro to be
  1062. applied may not itself execute the Search and apply macro command.
  1063.  
  1064. Find next                                        <CtrlL>, <ShF4>
  1065. Repeat the last search operation, if any. If the last search command called
  1066. for a Find pattern operation, the same search string and options will be used
  1067. to repeat it. If it was a Find and replace operation, the replacement string
  1068. will be reused as well. If it was a search and apply macro operation, the
  1069. search string, options, and macro will all be reused. Note that if a search
  1070. and apply macro operation is in progress, the last search operation will
  1071. temporarily be considered Find pattern, to allow the macro to search for a
  1072. second instance of the same string. For example, suppose you wanted to delete
  1073. all text not within single quotes from the following block:
  1074.  
  1075.    'One', abcdefg
  1076.    'Two', hijklmn
  1077.    'Three', opqrstu
  1078.  
  1079. To do this, you could search for a single quote, and then apply the following
  1080. macro to it:
  1081.  
  1082.    <BkSp>        Delete the first '
  1083.    <CtrlL>       Find the second one on the line
  1084.    <Left>        Move cursor over the second '
  1085.    <CtrlQ><Y>    Delete to end of line
  1086.  
  1087. To perform this operation on the entire block, you would specify "LN" as your
  1088. search options.
  1089.  
  1090.  
  1091. File Commands
  1092. ------------------------------------------------------------------------------
  1093.  
  1094. Edit another file                                <AltF3>
  1095. Load a new file into the current window. If the file being edited has been
  1096. modified, you'll be asked to confirm that you wish to abandon it.
  1097.  
  1098. Edit file from reload list                       <ShF3>
  1099. Load a new file, selected from the reload list, into the current window. If
  1100. the file being edited has been modified, you'll be asked to confirm that you
  1101. wish to abandon it.
  1102.  
  1103. Save and continue edit                           <CtrlK><S>, <F2>
  1104. Save the current file and continue editing.
  1105.  
  1106. Abandon file                                     <CtrlK><Q>, <AltF2>
  1107. Abandon the current file and close its window. If the file has been modified,
  1108. and it is not being edited in another window, you will be asked to confirm
  1109. this request.
  1110.  
  1111. Abandon all and exit to DOS                      *none*
  1112. Abandon all files and exit to DOS. If any of the files in memory have been
  1113. modified, you will be asked if you want to save them.
  1114.  
  1115. Save and exit to DOS                             <CtrlK><X>, <CtrlF2>
  1116. Save the current file and close its window. If the current window is the only
  1117. window, this command exits to DOS.
  1118.  
  1119. Save all and exit to DOS                         <AltX>
  1120. Save all modified files and exit to DOS.
  1121.  
  1122. Save all and continue                            <ShF2>
  1123. Save all modified files and continue editing. This command is especially
  1124. useful in macros that execute other programs.
  1125.  
  1126. Save/switch files                                <CtrlK><D>
  1127. Save the current file and load a new one into the current window.
  1128.  
  1129. Write to named file                              <CtrlK><N>
  1130. Save the current file under a new name.
  1131.  
  1132. Read block                                       <CtrlK><R>, <AltF10>
  1133. Reads a file into the window at the current position of the cursor and marks
  1134. it as a block.
  1135.  
  1136. Write block                                      <CtrlK><W>, <F10>
  1137. Writes the currently marked block to a file. You are first prompted for a
  1138. filename. If the file already exists, you are asked if you want to append the
  1139. block to the file or to overwrite it; if it does not exist, a new file is
  1140. created. The block is left unchanged, and the block markers remain in place.
  1141. If no block is marked, this command is ignored.
  1142.  
  1143.  
  1144. Window Commands
  1145. ------------------------------------------------------------------------------
  1146.  
  1147. Add window                                       <CtrlO><A>, <AltW>
  1148. Opens another text window. You will be prompted for a file to edit; if none is
  1149. specified, a "NONAME" file is created, which you may later save as a named
  1150. file using any of the Save file commands described above. If too many windows
  1151. are open, you will get an error message. If you enter the name of a file
  1152. already being edited, the new window will allow you to view a different
  1153. section of the file than is displayed in the first window.
  1154.  
  1155. Add window from reload list                      <^F3>
  1156. This command is largely identical to the Add window command, but instead of
  1157. being prompted for a file to edit you are asked to pick a file from the reload
  1158. list.
  1159.  
  1160. Previous window                                  <CtrlO><P>, <ShF1>
  1161. Makes the previous text window the current window.
  1162.  
  1163. Next window                                      <CtrlO><N>, <AltF1>
  1164. Makes the next text window the current window.
  1165.  
  1166. Resize current window                            <CtrlO><S>
  1167. Allows you to change the size of the current window. You adjust the size by
  1168. pressing the up and down cursor keys. When you are finished, pressing <Enter>
  1169. or <Esc> returns you to the editor.
  1170.  
  1171. Zoom current window                              <CtrlO><Z>, <AltZ>
  1172. Zooms the current window to fill the entire screen, hiding the other text
  1173. windows. When a window has been zoomed, "»ZOOM«" will appear at the top right
  1174. corner of the status line. If you change windows while zoomed, the window you
  1175. change to will be zoomed as well. If only one window is open at the time this
  1176. command is given, the command does nothing except request that the next window
  1177. opened should be zoomed.
  1178.  
  1179.  
  1180. Block Commands
  1181. ------------------------------------------------------------------------------
  1182.  
  1183. Begin block                                      <CtrlK><B>, <F7>
  1184. Marks the beginning of a block. The marker itself is not visible on the
  1185. screen, and the block becomes visible only when the end block marker is set.
  1186. You may also use the begin block marker as an extra text marker and jump
  1187. directly to it with the Top of block command.
  1188.  
  1189. End block                                        <CtrlK><K>, <F8>
  1190. Marks the end of a block. Like the begin block marker, the end block marker
  1191. is invisible, and the block itself will not be displayed unless both markers
  1192. are set. You may also use the end block marker as an extra text marker
  1193. and jump directly to it with the Bottom of block command.
  1194.  
  1195. Top of block                                     <CtrlQ><B>
  1196. Moves the cursor to the position of the block begin marker. The command works
  1197. even if the block is hidden or the block end marker is not set.
  1198.  
  1199. Bottom of block                                  <CtrlQ><K>
  1200. Moves the cursor to the position of the block end marker. The command works
  1201. even if the block is hidden or the block begin marker is not set.
  1202.  
  1203. Copy block                                       <CtrlK><C>, <AltF7>
  1204. Copy the currently marked and displayed block to the position of the cursor.
  1205. The block markers are placed around the new copy of the block.
  1206.  
  1207. Move block                                       <CtrlK><V>, <AltF8>
  1208. Move the currently marked and displayed block to the position of the cursor.
  1209. The block markers remain around the block at its new position.
  1210.  
  1211. Delete block                                     <CtrlK><Y>
  1212. Delete the currently marked and displayed block. Although the Undo command can
  1213. usually restore portions of an accidentally deleted block, there is no command
  1214. to restore a deleted block in its entirety, so you should use this command
  1215. with care.
  1216.  
  1217. Toggle block display                             <CtrlK><H>
  1218. Toggle the display of marked blocks. Note that several of the other block
  1219. commands do nothing or generate error messages if a marked block is not
  1220. displayed.
  1221.  
  1222. Mark current word                                <CtrlK><T>
  1223. Mark the current word as a block. See the description of the Word left command
  1224. for a definition of "word."
  1225.  
  1226. Indent block                                     <CtrlK><I>
  1227. Indent all lines in the currently marked and displayed block by a fixed number
  1228. of spaces. The default indention level of 2 may be changed using either
  1229. TINSTALL or the Set indentation level command. The cursor must be within the
  1230. block when the command is issued.
  1231.  
  1232. Unindent block                                   <CtrlK><U>
  1233. Unindent all lines in the currently marked and displayed block by a fixed
  1234. number of spaces (default is 2). Note that this command will not delete any
  1235. non-blank characters at the beginning of a line. The cursor must be within the
  1236. block when the command is issued.
  1237.  
  1238. Increment marked block                           <^K><^G>
  1239. Decrement marked block                           <^K><^L>
  1240. These two commands are somewhat similar to the Upper case, Lower case, and
  1241. Toggle case commands. If the cursor is not within a marked and displayed
  1242. block, they increment or decrement the value of the character at the cursor,
  1243. provided that it is not a space. If the cursor is within a block, the contents
  1244. of that block are examined. If the block is all on one line *and* the string
  1245. of characters within the block is a valid integer number in decimal format
  1246. within the range -MaxLongInt..MaxLongInt, the command will increment or
  1247. decrement that number. For example, if the block consists of "10", " 10", or
  1248. "010", and the Increment marked block command were given, the block would be
  1249. changed to "11", " 11", or "011" respectively. If the block is not on one
  1250. line, or if the contents of the block is not a valid number, each non-blank
  1251. character in the block will be incremented/decremented. For example, "BCDE"
  1252. would become "CDEF"/"ABCD".
  1253.  
  1254. One obvious use for these commands is to construct a macro such as the
  1255. following:
  1256.  
  1257.      <CtrlK><CtrlT>    Mark the current word as a block
  1258.      <CtrlK><CtrlG>    Increment the value of the block
  1259.      <Down>            Move the cursor to the next line
  1260.      <AltS><AltA>      Abort the macro if the new line is empty
  1261.      <AltS><AltR>      Repeat this macro
  1262.  
  1263. Assuming that the cursor were at the top of a column of numbers (a series of
  1264. constant declarations, for example), this macro would increment each number in
  1265. the column until it reached a blank line.
  1266.  
  1267.      Before         After
  1268.      ------        -------
  1269.        "99"          "100"
  1270.       " 99"         "100"
  1271.      "  99"        " 100"
  1272.      "0100"        "0101"
  1273.      "0101"        "0102"
  1274.      "0102"        "0103"
  1275.  
  1276. As you can see, it is acceptable for numbers to be left-padded with either
  1277. zeros or spaces. If the number after incrementing is wider than it was before,
  1278. all text to the right of the number will be pushed forward to make room.
  1279.  
  1280. Align block                                      <CtrlK><A>
  1281. Aligns all lines in the currently marked and displayed block with the first
  1282. line. For example, if the first non-blank character in the first line is at
  1283. column 5, the text in the remaining lines in the block will be adjusted so
  1284. that the first non-blank character in each line is at column 5. The cursor
  1285. must be within the block when the command is issued.
  1286.  
  1287. Reformat block                                   <CtrlK><F>
  1288. Reformats all paragraphs completely contained within the currently marked and
  1289. displayed block. Note that this command does nothing if word wrap is off.
  1290.  
  1291.  
  1292. Printing Commands
  1293. ------------------------------------------------------------------------------
  1294.  
  1295. Print current file                               <AltK><AltP>
  1296. Prints the current file in its entirety by writing it to the default printer
  1297. device (LPT1). You can change the default printer device using TINSTALL if
  1298. LPT1 is inappropriate for your system. (The other choices are LPT2, LPT3,
  1299. COM1, and COM2.) By default, TPE will send a formfeed (^L^M) to the printer at
  1300. the end of a print job, but you may disable this behavior using TINSTALL if
  1301. you wish.
  1302.  
  1303. Print block                                      <CtrlK><P>
  1304. Writes the currently marked and displayed block to the default printer device.
  1305. By default, TPE will send a formfeed to the printer at the end of the print
  1306. job.
  1307.  
  1308.  
  1309. Text Marker Commands
  1310. ------------------------------------------------------------------------------
  1311.  
  1312. Toggle marker display                            <CtrlK><M>
  1313. Toggle the display of text markers.
  1314.  
  1315. Set marker 0..9                                  <CtrlK><0>..<CtrlK><9>
  1316. Sets one of the ten text markers at the position of the cursor. <CtrlK><0>
  1317. sets marker 0, <CtrlK><1> sets marker 1, etc.
  1318.  
  1319. Jump marker 0..9                                 <CtrlQ><0>..<CtrlQ><9>
  1320. Moves the cursor to the specified text marker. <CtrlQ><0> jumps to marker 0,
  1321. <CtrlQ><1> jumps to marker 1, etc.
  1322.  
  1323.  
  1324. Macro Commands
  1325. ------------------------------------------------------------------------------
  1326.  
  1327. Toggle macro record                              <CtrlJ><T>
  1328. Turns macro recording on or off. When macro recording is on, all subsequent
  1329. keystrokes (up to the 255-keystroke limit) are saved in the scrap macro until
  1330. macro recording is turned off again. (Keystrokes used to turn it on and off
  1331. are not saved.) Once the macro is recorded, you are asked to select a macro
  1332. "slot" to store it in.
  1333.  
  1334. Edit macro                                       <AltS><AltM>
  1335. Edit an existing macro. In the macro editor, special keys (function keys,
  1336. cursor keys, etc.) are represented by abbreviated forms of their names--for
  1337. example, <Esc><CtrlN><Enter>--and these symbols are highlighted. Regular
  1338. keystrokes are shown as normal characters, without highlighting. When you
  1339. issue this command, you are asked to select a macro to edit, then to enter a
  1340. name for the macro (optional). Then you enter the macro editor itself. Several
  1341. keys serve special purposes here: the cursor keys behave as usual, moving the
  1342. cursor so you can select a particular keystroke to change; <BkSp> deletes a
  1343. single keystroke, just as it does in the regular editor; <CtrlBkSp> deletes an
  1344. entire macro; <Enter> accepts the macro. The <ScrollLock> key acts as a
  1345. toggle, turning literal interpretation of keystrokes on and off. For example,
  1346. if you wanted to insert the <Enter> key or the <BkSp> key into the macro, you
  1347. would first press <ScrollLock>. Pressing it again would restore all special
  1348. keys to their normal functions. The bottom right corner of the macro editor
  1349. window indicates whether the editor is in Command mode or Literal mode.
  1350.  
  1351. Load macros from disk                            <AltS><AltL>
  1352. Allows you to load a file of previously saved macros. If the file you specify
  1353. does not exist, an error message is displayed.
  1354.  
  1355. Write macros to disk                             <AltS><AltW>
  1356. Saves the current macros to the file you specify.
  1357.  
  1358. Playback macro by menu                           <AltT><AltM>
  1359. Displays a list of the currently defined macros. To play one of them back,
  1360. move the highlight over the appropriate menu item and press <Enter>. Press
  1361. <Esc> instead if you do not wish to playback a macro.
  1362.  
  1363. Playback macro 1..9                              <Alt1>..<Alt9>
  1364. Plays back the specified macro one time. <Alt1> plays back macro 1, <Alt2>
  1365. macro 2, and so on.
  1366.  
  1367. Playback scrap macro                             <CtrlJ><I>
  1368. Plays back the scrap macro (macro 0) a specified number of times. The scrap
  1369. macro is always the same as the last macro that was recorded, even if that
  1370. macro was saved as a normal macro (1-9). Note that the limit on the number of
  1371. times that the macro can be played back depends on the length of the macro (if
  1372. nothing else is in the keyboard buffer, the limit is '512 div Length(Macro)').
  1373.  
  1374. Playback scrap macro 1..9 time(s)                <CtrlJ><1>..<CtrlJ><9>
  1375. Plays back the scrap macro 1 to 9 times. <CtrlJ><1> plays it back once,
  1376. <CtrlJ><2> twice, and so on.
  1377.  
  1378.  
  1379. Special Commands for Use in Macros
  1380. ------------------------------------------------------------------------------
  1381.  
  1382. Force insert mode                                <AltF><AltI>
  1383. Forces insert mode on.
  1384.  
  1385. Force overtype mode                              <AltF><AltO>
  1386. Forces insert mode off.
  1387.  
  1388. Force autoindent mode                            <AltF><AltA>
  1389. Forces autoindent mode on.
  1390.  
  1391. Force word wrap on                               <AltF><AltW>
  1392. Forces word wrap mode on.
  1393.  
  1394. Abort macro if line empty                        <AltS><AltA>
  1395. Aborts the macro if the current line is empty.
  1396.  
  1397. Abort macro if end of file                       <AltS><AltF>
  1398. Aborts the macro if the cursor is at the first *or* last line of the file.
  1399.  
  1400. Abort macro if out of block                      <AltS><AltK>
  1401. Aborts the macro if the cursor is not within the currently marked block.
  1402.  
  1403. Repeat last macro                                <AltS><AltR>
  1404. Repeats the last macro. This command should generally be used only at the end
  1405. of a macro that is designed to be self-repeating *and* self-aborting. For
  1406. example, you might have a macro such as the following:
  1407.  
  1408.    <AltS><AltK>      Abort macro if cursor is not in the marked block
  1409.    <Home><Del><Del>  Delete two spaces at the start of the current line
  1410.    <Down>            Move the cursor to the next line
  1411.    <AltS><AltR>      Repeat last macro--i.e., this macro
  1412.  
  1413. (This macro is taken from the default macro file, TPE.MAC, where it
  1414. is assigned to <Alt2>. See the discussion of The Standard Macro File, below.)
  1415.  
  1416. The macro works something like this:
  1417.  
  1418.    while CursorInMarkedBlock do begin  { <AltS><AltK> }
  1419.      HomeTheCursor;                    { <Home> }
  1420.      DeleteOneChar;                    { <Del> }
  1421.      DeleteOneChar;                    { <Del> }
  1422.      CursorDown;                       { <Down> }
  1423.    end;                                { <AltS><AltR> }
  1424.  
  1425. The conditional test for aborting the macro should generally appear at the
  1426. beginning of the macro or just prior to the Repeat last macro command. If the
  1427. test is at the beginning, the macro will work like a "while" loop, meaning
  1428. that it will never be executed if the condition isn't met initially. If it is
  1429. just before the end, it will work like a "repeat..until" loop, meaning that
  1430. the first part of the macro will always be executed once:
  1431.  
  1432.    repeat
  1433.      HomeTheCursor;                    { <Home> }
  1434.      DeleteOneChar;                    { <Del> }
  1435.      DeleteOneChar;                    { <Del> }
  1436.      CursorDown;                       { <Down> }
  1437.      if not CursorInMarkedBlock then   { <AltS><AltK> }
  1438.        Exit;
  1439.    until False;                        { <AltS><AltR> }
  1440.  
  1441. Note that it is possible to record a macro that contains the Repeat last macro
  1442. command. However, TPE will automatically terminate the recording session as
  1443. soon as the command is issued, rather than actually repeating the macro. The
  1444. Repeat last macro command will then represent the last command in the recorded
  1445. macro.
  1446.  
  1447.  
  1448. Text Formatting Commands
  1449. ------------------------------------------------------------------------------
  1450.  
  1451. Reformat paragraph                               <CtrlB>
  1452. Rearranges words from the current line to the end of the paragraph such that
  1453. the lines are as full as possible, given the constraints imposed by the left
  1454. and right margins. The end of a paragraph is signaled by a blank line. This
  1455. command is available only when word wrap is on.
  1456.  
  1457. Center line                                      <CtrlO><C>
  1458. Centers the current line within the left and right margins.
  1459.  
  1460. Upper case                                       <CtrlO><U>
  1461. Convert all characters in the currently marked and displayed block to upper
  1462. case. If the cursor is not within a marked and displayed block, the character
  1463. at the cursor is converted to upper case.
  1464.  
  1465. Lower case                                       <CtrlO><V>
  1466. Convert all characters in the currently marked and displayed block to lower
  1467. case. If the cursor is not within a marked and displayed block, the character
  1468. at the cursor is converted to lower case.
  1469.  
  1470. Toggle case                                      <CtrlO><O>
  1471. Toggle the case of all characters in the currently marked and displayed block.
  1472. If the cursor is not within a marked and displayed block, the case of the
  1473. character at the cursor is toggled.
  1474.  
  1475. Mode Toggle Commands
  1476. ------------------------------------------------------------------------------
  1477.  
  1478. Toggle insert mode                               <Ins>, <CtrlV>
  1479. Toggle insert mode on or off. A fat cursor indicates insert mode; a thin
  1480. cursor indicates overtype mode. (If a solid block cursor is in use, only the
  1481. status line will indicate whether you are in insert or overtype mode.)
  1482.  
  1483. Toggle autoindent mode                           <CtrlQ><I>
  1484. Toggle autoindent mode on or off. In autoindent mode, pressing <Enter> while
  1485. in insert mode will cause the new line inserted to have the same indentation
  1486. level as the previous line. Autoindent mode also affects the way that text is
  1487. formatted when word wrap occurs--the new line will have the same indentation
  1488. level as the previous line--and hence the behavior of the reformatting
  1489. commands.
  1490.  
  1491. Toggle word wrap                                 <CtrlO><W>
  1492. Toggle word wrap on or off. When word wrap is on, any attempt to insert or
  1493. append text beyond the right margin will cause a new line to be inserted
  1494. following the current line and all words that are at least partially beyond
  1495. the right margin to be moved to the new line.
  1496.  
  1497. Toggle compress at wrap                          <AltT><AltC>
  1498. This option, which is on by default, tells TPE to compress excess white space
  1499. out of a line before trying to word wrap it. For example,
  1500.  
  1501.    this      is      a       test
  1502.  
  1503. would become
  1504.  
  1505.    this is a test
  1506.  
  1507. after compression. Leading white space is never removed. Note that this
  1508. setting also affects the behavior of the reformatting commands.
  1509.  
  1510. Toggle synchronized scroll                       <AltS><AltS>
  1511. When synchronized scrolling is on, all cursor movement commands are passed to
  1512. all visible windows on the screen for processing. This option is especially
  1513. useful when comparing two versions of the same file. Note that many cursor
  1514. movement commands--notably <Up>, <Down>, <Left>, and <Right>--will often have
  1515. no visible effect on windows other than the current one. The effects will be
  1516. visible only if the command causes the window to scroll. Note too that certain
  1517. commmands--such as <End>, <CtrlLeft>, and <CtrlRight>--may have slightly
  1518. different effects in different windows. Synchronized scrolling is temporarily
  1519. disabled when the current window is zoomed.
  1520.  
  1521. Commands for Controlling Text Formatting
  1522. ------------------------------------------------------------------------------
  1523.  
  1524. Set left margin                                  <CtrlO><L>
  1525. Set the left margin for text displayed on the screen. The default left margin
  1526. of 1 may be changed with TINSTALL.
  1527.  
  1528. Set right margin                                 <CtrlO><R>
  1529. Set the right margin for text displayed on the screen. The default right
  1530. margin of 78 may be changed with TINSTALL.
  1531.  
  1532. Set indentation level                            <CtrlO><B>
  1533. Set the indentation level for marked blocks. This setting affects the behavior
  1534. of the Indent block and Unindent block commands. The default indentation level
  1535. of 2 may be changed with TINSTALL.
  1536.  
  1537. Screen Toggle Commands
  1538. ------------------------------------------------------------------------------
  1539.  
  1540. Toggle 43-/50-line mode                          <AltT><AltE>
  1541. Activates/deactivates the 43-line mode on EGA's or the 50-line mode on VGA's.
  1542. Note that TPE will restore the mode that the system was in initially before
  1543. exiting to DOS or executing another program.
  1544.  
  1545. Toggle user-defined mode                         <AltT><AltU>
  1546. Activates/deactivates the user-defined video mode if one was specified with
  1547. TINSTALL. If none was specified, this command does nothing.
  1548.  
  1549. Toggle line-drawing mode                         <AltL>
  1550. This command lets you activate/deactivate one of TPE's four line-drawing
  1551. modes. In a line-drawing mode, pressing <Left>, <Right>, <Up>, or <Down> will
  1552. cause an appropriate line-drawing character to be placed at the position of
  1553. the cursor, overwriting the character beneath the cursor, if any. The cursor
  1554. will then be moved in the direction indicated, if appropriate. Note that, when
  1555. line-drawing characters are being inserted, the current margins are ignored,
  1556. as are the states of the autoindent, word wrap, and insert mode toggles.
  1557.  
  1558. By default, TPE runs in "edit mode," in which the four cursor keys simply move
  1559. the cursor. Pressing <AltL> repeatedly allows you to select one of the four
  1560. line-drawing modes, corresponding to the following sets of characters:
  1561.  
  1562.   ─│┌┐└┘    ═║╔╗╚╝    ─║╓╖╙╜    ═│╒╕╘╛
  1563.  
  1564. Pressing <AltL> a fifth time brings you back to edit mode. You can switch back
  1565. to edit mode immediately by pressing <AltE> (Force edit mode), or you can
  1566. temporarily switch to edit mode by pressing <ScrollLock>. Note that ScrollLock
  1567. is forced off when you give either the <AltL> or the <AltE> command.
  1568.  
  1569. As with other mode toggles, activating a line-drawing mode in the current
  1570. window has no effect on other windows. When one of the line-drawing modes is
  1571. in effect for a given window, the left side of its status line is used to
  1572. display the corresponding character set. If ScrollLock is active, however, and
  1573. that window is the current window, 'ScLock' is displayed there instead to
  1574. remind you that the line-drawing mode has been temporarily overridden. If the
  1575. window is in edit mode, that portion of the status line is used to display the
  1576. '»SAVE«' reminder, as usual.
  1577.  
  1578. Force edit mode                                  <AltE>
  1579. Forces a return to edit mode.
  1580.  
  1581. Toggle snow check                                <AltT><AltS>
  1582. Turns snow checking on or off. Since snow checking is needed only for older
  1583. CGA adapters, TPE will ignore this command if the current display is not a
  1584. CGA.
  1585.  
  1586. Toggle block cursor                              <AltT><AltB>
  1587. Hides the blinking cursor you normally see on the screen and replaces it with
  1588. a solid, non-blinking "block cursor". You can change the appearance of the
  1589. block cursor with TINSTALL. The blinking cursor is restored when you exit from
  1590. TPE or when you execute another program.
  1591.  
  1592. Toggle initial zoom                              <AltT><AltZ>
  1593. If the initial zoom option is in effect (it is off by default), new windows
  1594. will automatically be zoomed when they are first opened.
  1595.  
  1596.  
  1597. Program Configuration Commands
  1598. ------------------------------------------------------------------------------
  1599.  
  1600. Set support path                                 <AltS><AltP>
  1601. The support path is the drive:\directory where TPE looks for its help file
  1602. (TPE.HLP) and the standard macro file (TPE.MAC).
  1603.  
  1604. Set default extension                            <AltS><AltE>
  1605. Used to specify the default extension for filenames. This extension is
  1606. automatically added to filenames lacking extensions. For example, if you have
  1607. set the default extension to "PAS" (the default setting) and wish TPE to load
  1608. "MYPROG.PAS" when the program starts, you can enter
  1609.  
  1610.      tpe myprog
  1611.  
  1612. at the command line. Note that you must issue the Save defaults command if you
  1613. want to make this setting permanent.
  1614.  
  1615. Save defaults                                    <AltS><AltD>
  1616. Allows you to save the current configuration settings as the defaults. If TPE
  1617. found TPE.CFG when it first loaded, that copy of TPE.CFG will be overwritten
  1618. with the new settings. If TPE.CFG was not found initially, a new TPE.CFG file
  1619. will be created in the current directory. This command is of little use if
  1620. you've selected the option to automatically save the configuration data on
  1621. exit.
  1622.  
  1623.  
  1624. Miscellaneous Commands
  1625. ------------------------------------------------------------------------------
  1626.  
  1627. Show system info                                 <CtrlJ><V>, <AltI>
  1628. Shows you a variety of statistics about the file in the current window, as
  1629. well as certain "system information": the version of TPE in use; the full
  1630. pathname of the file being edited; the number of lines, bytes, and words in
  1631. the file; the amount of RAM and (if appropriate) virtual memory remaining; the
  1632. current drive and directory; and the amount of space remaining on the current
  1633. drive.
  1634.  
  1635. Show available memory                            <CtrlJ><R>, <AltM>
  1636. Displays the amount of virtual memory available within the editor.
  1637.  
  1638. Invoke DOS shell                                 <CtrlJ><O>, <AltD>
  1639. This command gives you access to DOS services or to other programs from within
  1640. TPE. You will be prompted for the name of a program or a DOS command to be
  1641. executed. If you need to run several programs, you can invoke a DOS "shell"
  1642. simply by leaving the command string blank and pressing <Enter>. To return to
  1643. TPE from a DOS shell, enter "EXIT" at the DOS command line.
  1644.  
  1645. As mentioned elsewhere, one of the nicest features of TPE is its ability to
  1646. swap itself almost entirely out of memory before executing other programs.
  1647. Only a tiny kernel of about 4K remains in memory; the rest of the program is
  1648. swapped to disk, EMS, or XMS.
  1649.  
  1650. Note that you cannot load a second copy of TPE while you are shelled out to
  1651. DOS. If you try to do so, TPE will abort with the message "TPE is already
  1652. loaded."
  1653.  
  1654. One other special note about this command. TPE analyzes the command line you
  1655. specify and replaces each instance of "%p%" with the full pathname of the
  1656. primary file. (See the next section of the documentation.) For example, if the
  1657. primary file is "C:\PAS\MYPROG.PAS", then "tpc %p%" would be treated as
  1658. equivalent to "tpc C:\PAS\MYPROG.PAS". Note that there may be more than one
  1659. instance of "%p%" in the command string. This feature makes it possible to
  1660. create a macro that executes a utility program and automatically passes it the
  1661. name of the primary file. For example, the macro "<ShF2><AltD>psa %p%<Enter>"
  1662. would save all modified files and then execute the PSA program from Turbo
  1663. Analyst, passing it the name of the primary file as a parameter.
  1664.  
  1665. Log drive/path                                   <CtrlJ><D>, <AltP>
  1666. Allows you to change the active drive and directory. You may enter a drive and
  1667. path, or you can specify a "file mask" and choose a new path from a directory
  1668. listing. For example, entering
  1669.  
  1670.      C:\*.*
  1671.  
  1672. would show you a list of all the subdirectories that branch out of the root
  1673. directory on drive C. When the name of the directory you want is displayed at
  1674. the top of the window, press <Esc> to make it the current directory.
  1675.  
  1676. Abort                                            <CtrlU>
  1677. Used to halt an operation in progress. The keyboard buffer is checked
  1678. regularly to see if the abort command has been issued; if it has, the buffer
  1679. is emptied and the operation is stopped.
  1680.  
  1681. Load help file                                   <F1>
  1682. This command tells TPE to load the help file (TPE.HLP) created by TINSTALL. If
  1683. the file is found on the support path, and there are fewer than 8 windows
  1684. open, TPE will open a new window, load TPE.HLP into it, and then zoom the
  1685. window. There is nothing special about the help file. It is an ordinary ASCII
  1686. text file, and you may do anything with it that you could do with any other
  1687. file (perform searches, edit it, etc.).
  1688.  
  1689. Display user screen                              <AltF5>
  1690. This command displays the contents of "the user screen"--the screen that was
  1691. active when TPE first started. If any other programs have been executed while
  1692. within TPE, the output of those programs can be viewed using this command.
  1693. Press any key to return to the TPE screen.
  1694.  
  1695. Commands for Executing a Program
  1696. ------------------------------------------------------------------------------
  1697.  
  1698. Set primary file                                 <AltC><AltP>
  1699. This command lets you specify the name of the "primary file," usually the main
  1700. source file for the program you are working on in the editor.
  1701.  
  1702. Reset primary file                               <AltC><AltR>
  1703. This command makes the file in the current window the primary file.
  1704.  
  1705. Execute primary file                             <CtrlF9>, <AltR>
  1706. This command executes the program corresponding to the primary file. When
  1707. searching for the program to be executed, TPE will apply the default extension
  1708. for executables to the name of the primary file (see the Set extension for
  1709. executables command). It will look for the file first in the current directory
  1710. and then on the DOS path. If it is unable to locate the program, you will be
  1711. asked to enter its name. If the Confirmation of parameters option is On, as it
  1712. is by default, you will be given an opportunity to edit the command line to be
  1713. passed to the program before it is executed. (The state of this option may be
  1714. changed using the Toggle confirmation of parameters command.)
  1715.  
  1716. Set extension for executables                    <AltC><AltE>
  1717. Lets you specify the default extension to be applied to the name of an
  1718. executable program. The default setting of "EXE" should be left alone unless
  1719. you are compiling/running/debugging a program that compiles to a COM file.
  1720.  
  1721. Set default parameters                           <AltC><AltS>
  1722. Lets you specify a list of parameters to be passed to a program when the
  1723. Execute primary file or Debug primary file commands are issued.
  1724.  
  1725. Toggle confirmation of parameters                <AltC><AltT>
  1726. This command toggles the option that determines whether or not you will be
  1727. asked to confirm the command line to be passed to a program being executed.
  1728. This option is On by default, unless you have changed the default setting with
  1729. TINSTALL. Note that this setting also applies to the compiler, assembler, and
  1730. debugger.
  1731.  
  1732.  
  1733. Commands for Compiling Programs
  1734. ------------------------------------------------------------------------------
  1735.  
  1736. Select compiler                                  <ShF5>
  1737. This command allows you to change the current compiler, assuming that you have
  1738. configured TPE for use with multiple compilers. The abbreviation for the
  1739. currently selected compiler will appear on the status lines for all visible
  1740. windows. Note that, unlike TINSTALL, TPE will not allow you to select a given
  1741. compiler unless it has a 1- to 4-character abbreviation.
  1742.  
  1743. Compile w/ primary options                       <F9>
  1744. This command compiles the primary file using the current compiler and its
  1745. primary compiler options. Normally this command is used to compile a program
  1746. *without* debug information. If the Confirmation of parameters option is On,
  1747. as it is by default, you will be given an opportunity to edit the command line
  1748. to be passed to the compiler before it is executed.
  1749.  
  1750. Compile w/ secondary options                     <AltF9>
  1751. This command compiles the primary file using the current compiler and its
  1752. secondary compiler options. Normally this command is used to compile a program
  1753. *with* debug information, in preparation for running it in the debugger. If
  1754. the Confirmation of parameters option is On, as it is by default, you will be
  1755. given an opportunity to edit the command line to be passed to the compiler
  1756. before it is executed.
  1757.  
  1758. Set path to compiler                             <AltC><AltN>
  1759. Lets you specify the complete pathname of the current compiler. Note that TPE
  1760. will automatically use the first four letters of the compiler's name as its
  1761. abbreviation. For example, if you set the path to the current compiler to
  1762. 'C:\BC\BIN\BCCX.EXE', TPE will set the compiler's abbreviation to 'BCCX'.
  1763.  
  1764. Set primary compiler options                     <AltC><AltO>
  1765. Lets you specify the command line options to be passed to the current compiler
  1766. when you issue the Compile w/ primary options command.
  1767.  
  1768. Set secondary compiler options                   <AltC><Alt2>
  1769. Lets you specify the command line options to be passed to the current compiler
  1770. when you issue the Compile w/ secondary options command.
  1771.  
  1772.  
  1773. Commands for Assembling Programs
  1774. ------------------------------------------------------------------------------
  1775.  
  1776. Assemble file                                    <AltA>
  1777. This command assembles either the file in the current window (default) or the
  1778. primary file, depending on how TPE is configured. If the Confirmation of
  1779. parameters option is On, as it is by default, you will be given an opportunity
  1780. to edit the command line to be passed to the assembler before it is executed.
  1781.  
  1782. Set path to assembler                            <AltC><AltA>
  1783. Lets you specify the complete pathname of the assembler.
  1784.  
  1785. Set assembler options                            <AltC><AltC>
  1786. Lets you specify the command line options to be passed to the assembler when
  1787. you issue the Assemble file command.
  1788.  
  1789.  
  1790. Commands for Debugging Programs
  1791. ------------------------------------------------------------------------------
  1792.  
  1793. Debug primary file                               <ShF9>
  1794. This command invokes the debugger, passing it any command-line options
  1795. specified with the Set debugger options command, followed by the name of the
  1796. primary file (after applying the default extension for executables to the
  1797. filename), plus any command line options you have specified with the Set
  1798. default parameters command. If the Confirmation of parameters option is On, as
  1799. it is by default, you will be given an opportunity to edit the command line to
  1800. be passed to the debugger before it is executed.
  1801.  
  1802. Set path to debugger                             <AltC><AltD>
  1803. Lets you specify the complete pathname of the debugger.
  1804.  
  1805. Set debugger options                             <AltC><AltG>
  1806. Lets you specify the command line options to be passed to the debugger when
  1807. you issue the Debug primary file command.
  1808.  
  1809.  
  1810. The Standard Macro File: TPE.MAC
  1811. ------------------------------------------------------------------------------
  1812.  
  1813. When TPE first starts, it looks for a macro file called TPE.MAC. It looks for
  1814. this file first in the current directory and then in TPE's support path
  1815. directory (set with TINSTALL). In the typical case, you will have only one
  1816. file called TPE.MAC, located in your support path. However, if you wish you
  1817. may have multiple files of that name for use on different projects. Just keep
  1818. in mind that TPE will look only in the current directory for a
  1819. project-specific macro file.
  1820.  
  1821. In any case, if a file called TPE.MAC is found, the macros are loaded and
  1822. effectively become part of the TPE command set. We have provided a file by
  1823. this name containing the macros we routinely use. You may edit these macros,
  1824. add new ones, or replace the file entirely.
  1825.  
  1826. The standard macros in TPE.MAC are as follows:
  1827.  
  1828. 0 Scrap
  1829.     This macro is reserved for recording purposes, and is never saved by the
  1830.     Write macro file command. Hence it is always empty when TPE starts.
  1831.  
  1832. 1 Destructive unindent
  1833.     This macro deletes two characters at the beginning of each line in the
  1834.     currently marked block.
  1835.  
  1836. 2 Destructive unindent one
  1837.     This macro is chained to by macro 1. It deletes two characters at the
  1838.     beginning of each line in the currently marked block, starting at the
  1839.     current line.
  1840.  
  1841. 3 Procedure shell
  1842.     This macro constructs a "shell" for a procedure:
  1843.  
  1844.        procedure ;
  1845.          {-}
  1846.        begin
  1847.        end;
  1848.  
  1849.     Like all the "shell" macros, it forces insert and autoindent modes on.
  1850.  
  1851. 4 Function shell
  1852.     Constructs a "shell" for a function:
  1853.  
  1854.        function :;
  1855.          {-}
  1856.        begin
  1857.        end;
  1858.  
  1859. 5 Program shell
  1860.     Constructs a "shell" for a program:
  1861.  
  1862.        program ;
  1863.          {-}
  1864.        uses ;
  1865.        type
  1866.        const
  1867.        var
  1868.        begin
  1869.        end.
  1870.  
  1871. 6 Unused
  1872.  
  1873. 7 Unit shell
  1874.     Constructs a "shell" for a unit:
  1875.  
  1876.        unit ;
  1877.          {-}
  1878.        interface
  1879.        uses ;
  1880.        implementation
  1881.        {begin}
  1882.        end.
  1883.  
  1884. 8 Indent marked block
  1885.     Simply executes the indent marked block command (<CtrlK><CtrlI>). A
  1886.     holdover from the days before there was such a command.
  1887.  
  1888. 9 Unindent marked block
  1889.     Executes the unindent marked block command (<CtrlK><CtrlU>). Another
  1890.     holdover.
  1891.  
  1892. Even if you don't have any use for the macros themselves, you will probably
  1893. want to study them when you start writing your own.
  1894.  
  1895.  
  1896. TPE's Virtual Memory Manager
  1897. ------------------------------------------------------------------------------
  1898.  
  1899. TPE uses a virtual memory manager that allows it to store text being edited in
  1900. "virtual memory," which can be either RAM, EMS, XMS, or disk. By default, TPE
  1901. uses normal RAM, but you can select one of the other sources of memory either
  1902. by changing the default setting with TINSTALL or by passing the appropriate
  1903. command line parameter to TPE when you go to run it: /E for EMS, /X for XMS,
  1904. /D for disk, or /N for normal RAM. If the desired source of virtual memory is
  1905. not available, or is too limited to be of use, TPE will display an error
  1906. message when it starts and use normal RAM instead.
  1907.  
  1908. Note that TPE does not store all its data in virtual memory; many things are
  1909. always stored in normal RAM. In particular, TPE allocates a single 16-byte
  1910. data structure in RAM for each line in a given file. In addition, when using
  1911. either XMS or disk for virtual memory, TPE also allocates roughly one third of
  1912. available RAM for buffering data stored in virtual memory. Given 600K of
  1913. available RAM, TPE will therefore be able to edit a file of about 27,000 lines
  1914. if using EMS, or 18,000 lines if using XMS or disk. To see how much RAM and
  1915. virtual memory is still available, use the Show system info command
  1916. (<CtrlJ><V> or <AltI>). The Show available memory command (<CtrlJ><R> or
  1917. <AltM>) displays only the amount of virtual memory remaining.
  1918.  
  1919. When TPE runs out of memory, you'll see one of two error messages. If it has
  1920. exhausted the supply of normal RAM, you'll see "Insufficient memory." If it
  1921. runs out of virtual memory, you'll see "Insufficient virtual memory." Please
  1922. keep this distinction in mind. The fact that you have lots of virtual memory
  1923. available doesn't mean that you won't be seeing an "Insufficient memory" error
  1924. message.
  1925.  
  1926. There are two other error messages that you might see in this connection. The
  1927. first is simply a warning message: "Warning! Limited RAM available". This
  1928. message will appear only when EMS, XMS, or disk is being used for virtual
  1929. memory. What it means is that the virtual heap is badly fragmented, and that
  1930. TPE is dangerously close to not having enough memory (RAM) reserved to keep
  1931. track of all the blocks of available virtual memory. If you see this warning,
  1932. the best thing to do is to save your work, exit from TPE, and reload TPE with
  1933. the /A option.
  1934.  
  1935. The second error message is one we hope you'll never see: "Critical error nnn.
  1936. Data may be lost." What this means is that the virtual memory manager has
  1937. encountered an unrecoverable error, and you need to exit immediately. If the
  1938. error number ("nnn") is 204, you're in good shape. That simply means that the
  1939. virtual heap is so badly fragmented that TPE can no longer keep track of all
  1940. the free memory blocks. No data has been lost, but you should save all your
  1941. work and exit immediately. You shouldn't see this message unless you've
  1942. previously seen the warning message described above.
  1943.  
  1944. Any other critical error message is very bad news indeed. It means that an
  1945. I/O error occurred while trying to access the source of virtual memory (a disk
  1946. read error, for example). In all likelihood, at least some of your data has
  1947. been lost. You can try saving your work before exiting, but very likely the
  1948. file will contain garbage or be incomplete.
  1949.  
  1950.  
  1951. Copyright and License Information
  1952. ------------------------------------------------------------------------------
  1953.  
  1954. TPE is copyright (c) 1990-1991 by TurboPower Software. All Rights Reserved.
  1955.  
  1956. Although TPE is copyrighted software, license is hereby granted to distribute
  1957. the program for personal, non-commercial use. You may use the program
  1958. yourself, give it to your friends or co-workers, or distribute it for a
  1959. cost-based fee ($20 or less) as part of a user's group or bulletin board
  1960. service.
  1961.  
  1962. TPE is not shareware: we're not asking for a donation. However, if you request
  1963. that we send you a new version, we'll ask for $20 to cover our time and costs.
  1964. You will receive only a disk containing the latest version of the program. You
  1965. will not receive any printed documentation. The only "manual" for TPE is this
  1966. DOC file.
  1967.  
  1968. Alternatively, the current version of the program may be downloaded from
  1969. our data library on CompuServe, LIB 6 of the PCVENB forum. The name of the
  1970. file to download is TPE.LZH.
  1971.  
  1972. Since TPE is neither commercial software nor shareware, and we are not
  1973. attempting to make any profit from it, we would ask that you please restrain
  1974. your natural urge to suggest enhancements to it. Responding to such requests
  1975. can take lots of time, time that we ought to be spending developing new
  1976. products, enhancing existing ones, and supporting our paying customers. Your
  1977. consideration will be much appreciated.
  1978.  
  1979. On the other hand, please feel free to contact us if you encounter a problem
  1980. with the program. We depend heavily on this program ourselves, and we have a
  1981. vested interest in insuring that it works properly. If you encounter a problem
  1982. with TPE, you may contact Brian Foley at:
  1983.  
  1984.      TurboPower Software
  1985.      P.O. Box 49009
  1986.      Colorado Springs, CO
  1987.      80949-9009
  1988.  
  1989. You can also leave messages in section 6 of the PCVENB forum on CompuServe,
  1990. addressed to Brian Foley [76317,3247].
  1991.